﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace DDD_AOP_WCF.Domain.DTO
{
    [DataContract]
    public class ProductDTO
    {
        [DataMember]
        [DisplayName("商品ID")]
        [Required]
        public int ProductID { get; set; }
        [DataMember]
        [DisplayName("商品名称")]
        [MinLength(6), MaxLength(20)]
        [Required]
        public string ProductName { get; set; }
        [DataMember]
        [DisplayName("建立日期")]
        [Required]
        public System.DateTime CreateDate { get; set; }
        [DataMember]
        [StringLength(2)]
        [Required]
        public int SaleCount { get; set; }
        [DataMember]
        [Required]
        public Nullable<int> ClickCount { get; set; }
        [DataMember]
        [DisplayName("产品描述")]
        [Required]
        public string Info { get; set; }
        [DataMember]
        [Required]
        public int UserID { get; set; }
        [DataMember]
        [DisplayName("销售价格")]
        [Required]
        public decimal SalePrice { get; set; }
        [DataMember]
        [DisplayName("折扣")]
        [Required]
        public int Discount { get; set; }
    }
}
